import 'package:Smart/pages/productor007/studytest/flutter_boss/model/job.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_boss/main.dart';
// import 'package:flutter_boss/model/job.dart';

class JobListItem extends StatelessWidget {
  final Job job;
  List tags = ["经验不限","本科","Vue","CSS","HTML"];
   List<Widget> tiles = [];

  JobListItem(this.job);
  @override
  Widget build(BuildContext context) {
    return Padding(
        padding:
            const EdgeInsets.only(top: 3.0, left: 5.0, right: 5.0, bottom: 3.0),
        child: SizedBox(
          child: Card(
            elevation: 0.0,
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Expanded(
                    child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisSize: MainAxisSize.min,
                  children: <Widget>[
                    Row(
                      children: <Widget>[
                        Padding(
                          padding: const EdgeInsets.only(
                            top: 10.0,
                            left: 10.0,
                            bottom: 5.0,
                          ),
                          child: Text(job.name),
                        ),
                        Expanded(
                            child: Column(
                          crossAxisAlignment: CrossAxisAlignment.end,
                          children: <Widget>[
                            Padding(
                              padding: const EdgeInsets.only(
                                right: 10.0,
                              ),
                              child: Text(
                                job.salary,
                                style: TextStyle(
                                    color: Color.fromARGB(255, 0, 215, 198)),
                              ),
                            )
                          ],
                        ))
                      ],
                    ),
                    Padding(
                      padding:EdgeInsets.symmetric(vertical: 5,horizontal: 10),
                      // 小标签部分
                      child:Row(
                        children: [
                          Container(
                            margin: EdgeInsets.only(right:10),
                            decoration: new BoxDecoration(
                              color: Colors.grey[200], // 底色
                              borderRadius: new BorderRadius.circular((6.0)),
                            ),
                            child: Padding(
                              padding: EdgeInsets.symmetric(vertical: 4,horizontal: 8),
                              child: Text("经验不限",style: TextStyle(fontSize: 12),),
                            ),
                          ) ,
                          Container(
                            margin: EdgeInsets.only(right:10),
                            decoration: new BoxDecoration(
                              color: Colors.grey[200], // 底色
                              borderRadius: new BorderRadius.circular((6.0)),
                            ),
                            child: Padding(
                              padding: EdgeInsets.symmetric(vertical: 4,horizontal: 8),
                              child: Text("本科",style: TextStyle(fontSize: 12),),
                            ),
                          ) ,
                          Container(
                            margin: EdgeInsets.only(right:10),
                            decoration: new BoxDecoration(
                              color: Colors.grey[200], // 底色
                              borderRadius: new BorderRadius.circular((6.0)),
                            ),
                            child: Padding(
                              padding: EdgeInsets.symmetric(vertical: 4,horizontal: 8),
                              child: Text("Vue",style: TextStyle(fontSize: 12),),
                          ),
                          ) ,
                          Container(
                            decoration: new BoxDecoration(
                              color: Colors.grey[200], // 底色
                              borderRadius: new BorderRadius.circular((6.0)),
                            ),
                            child: Padding(
                              padding: EdgeInsets.symmetric(vertical: 4,horizontal: 8),
                              child: Text("HTML",style: TextStyle(fontSize: 12),),
                            ),
                          ) ,
                        ],
                      ) ,
                    ),
                    Container(
                      child: Text(
                        job.cname + " " + job.size + " 0-20人",
                        textAlign: TextAlign.left,
                        style: TextStyle(fontSize: 15.0, color: Colors.grey),
                      ),
                      margin: const EdgeInsets.only(
                          top: 5.0, left: 10.0, bottom: 5.0),
                    ),
                    // Divider(),
                    Padding(
                        padding: EdgeInsets.only(
                            top: 5.0, left: 10.0, right: 10.0, bottom: 15.0),
                        child: Row(
                          children: [
                            Expanded(
                              child: Row(
                                children: [
                                  ClipOval(
                                    child: Image.network(
                                      'https://i0.hdslb.com/bfs/face/member/noface.jpg@140w_140h_1c.webp',
                                      width: 30.0,
                                      height: 30.0,
                                    ),
                                  ),
                                  SizedBox(
                                    width: 20.0,
                                  ),
                                  Text(
                                    job.username + " · " + job.title,
                                    style: TextStyle(
                                        color:
                                            Color.fromARGB(255, 0, 215, 198)),
                                  ),
                                ],
                              ),
                            ),
                            Align(
                              alignment: Alignment.centerRight,
                              child: Text(
                                job.address,
                                style: TextStyle(color: Colors.grey[500]),
                              ),
                            ),
                          ],
                        )),
                  ],
                ))
              ],
            ),
          ),
        ));
  }
}
